<?php
defined('IS_ROGER') or die('文件损坏无法运行...');
defined('BASE_PATH') or die('Base Path 没有设置');
//$require = [
//    'Library\\Route\\Route' => BASE_PATH.'/Library/Route/Route.php',
//    'Library\\HttpParams\\HttpParams' => BASE_PATH.'/Library/HttpParams/HttpParams.php',
//    'Library\\Error\\A404' => BASE_PATH.'/Library/Error/A404.php',
//];

// 加载必要的库文件
//foreach($require as $key => $val) {
//    if(file_exists($val)) {
//        include_once $val;
//    }
//}

// php vsersion check
if(version_compare(PHP_VERSION,'5.3.0','<')) {
    throw new Exception('Your php version is too low');
}

// composer autoload psr-4
include_once "vendor/autoload.php";
if(class_exists("Library\\Roger\\App")) {
    \Library\Roger\App::run();
} else {
    throw new Exception('App can\'t run!');
}
